//
//  SearchToolBarView.m
//  YCH
//
//  Created by apple on 2019/7/22.
//  Copyright © 2019 KN. All rights reserved.
//

#import "SearchToolBarView.h"

@interface SearchToolBarView ()

//
@property (nonatomic,strong)UIButton* serachButton;

@end

@implementation SearchToolBarView

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self setupUI];
    }
    return self;
}

- (void)setupUI
{
    self.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.serachButton];
    
    [_serachButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self);
    }];
    
}


-(UIButton* )serachButton
{
    if (_serachButton == nil) {
        _serachButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_serachButton setTitle:@"搜索" forState:UIControlStateNormal];
        [_serachButton setImage:[UIImage imageNamed:@"SearchMap"] forState:UIControlStateNormal];
        _serachButton.titleLabel.font = [UIFont systemFontOfSize:11];
        [_serachButton setTitleColor:ColorHex(0x999999) forState:UIControlStateNormal];
        _serachButton.userInteractionEnabled = NO;
    }
    return _serachButton;
}

@end
